
import java.util.Scanner;

public class Main{

    public String isWin;

    public static void main(String[] args) {
        Main main = new Main();
        NGuessNumber nGuessNumber = new NGuessNumber();
        Scanner input = new Scanner(System.in);
        int a = input.nextInt();
        //System.out.println("按0开始游戏");
        while (a == 0) {
            main.isWin = String.valueOf(nGuessNumber.compareGuessAnswer());
            switch (main.isWin) {
                case "true":
                    System.out.println("获胜！");
                    break;
                case "false":
                    System.out.println("失败！");
                    break;
            }
            System.out.println("结束请按1，继续请按0");
            int b = input.nextInt();
            if (b==1){
                break;
            }
        }
    }
}
